<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

	<ui:composition 
	  xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      template="/view/templates/templateLayout.xhtml">
      
      <ui:define name="conteudo">    
      <link rel="stylesheet" type="text/css" href="./estilos.css"/>  	
  	
<h:form id="formConsultarAvaliacaoFisica">  
	<p:panel id="panelConsultarAvaliacaoFisica" header="Consultar AvaliacaoFisica" style=" margin-bottom:20px; ">  
		<f:facet name="header">
			<h:outputText value="Consultar AvaliacaoFisica" styleClass="outputTextTitulo"/>
		</f:facet>
 	<p:messages id="messages" showDetail="true"/> 
    	<h:panelGrid  columns="1" style="margin-top:20px; margin-right:10%;">
            <h:outputLabel value="Data" styleClass="outputLabel"/>
  			<p:inputMask mask="99/99/9999" value="#{avaliacaoFisicaBean.avaliacaoFisica.dtAvaliacao}" styleClass="inputData">
  				<f:convertDateTime dateStyle="medium"/>
  			</p:inputMask>  
            <h:outputLabel value="Aluno" styleClass="outputLabel"/>
  			<p:inputText value="#{avaliacaoFisicaBean.avaliacaoFisica.aluno.nome}" styleClass="inputDescricao"/> 
            <h:outputLabel value="Professor" styleClass="outputLabel"/>   
  			<p:inputText value="#{avaliacaoFisicaBean.avaliacaoFisica.funcionario.nome}" styleClass="inputDescricao"/> 
        </h:panelGrid> 
    </p:panel>  
    <p:commandButton value="Consultar" actionListener="#{avaliacaoFisicaBean.findAvaliacaoFisica}" update="dataTableAvaliacaoFisica" style="margin-right:20px; margin-left:10px;" /> 
	<p:commandButton value="Novo" action="#{avaliacaoFisicaBean.newAvaliacaoFisica}" style="margin-right:20px;" /> 
	<p:commandButton value="Limpar"  actionListener="#{avaliacaoFisicaBean.clean}" style="margin-right:20px;" />
    		
   		
    <p:dataTable id="dataTableAvaliacaoFisica" var="AvaliacaoFisica" value="#{avaliacaoFisicaBean.dmAvaliacaoFisica}"  
    			 rowKey="#{AvaliacaoFisica.idAvaliacaoFisica}"  selectionMode="single"
                 style="padding-top:20px; width:60%">  
        <f:facet name="header">Avaliações Físicas</f:facet>    
		<p:column style="width:10%; text-align:center">  
            <f:facet name="header">  
                <h:outputText value="Código " />  
            </f:facet>  
            <h:outputText value="#{AvaliacaoFisica.idAvaliacaoFisica}" />  
        </p:column>  		
        <p:column>  
            <f:facet name="header">  
                <h:outputText value="Aluno" />  
            </f:facet>  
            <h:outputText value="#{AvaliacaoFisica.aluno.nome}" />  
        </p:column>  		
        <p:column>  
            <f:facet name="header">  
                <h:outputText value="Professor" />  
            </f:facet>  
            <h:outputText value="#{AvaliacaoFisica.funcionario.nome}" />  
        </p:column>  		
        <p:column>  
            <f:facet name="header">  
                <h:outputText value="Data" />
            </f:facet>  
            <h:outputText value="#{AvaliacaoFisica.dtAvaliacao}" > 
            	<f:convertDateTime dateStyle="medium"/>
            </h:outputText>   
        </p:column>  
 
        
        <p:column style="width:4%; text-aling:center">  
        	<f:facet name="header">
        		<h:outputText value="Editar" />
        	</f:facet>
         	<p:commandButton id="selectButtonEditar"  icon="ui-icon-pencil" title="Detail" action="#{avaliacaoFisicaBean.editarAvaliacaoFisica}">
				<f:setPropertyActionListener value="#{avaliacaoFisica}" target="#{avaliacaoFisicaBean.afSelecionada}" />  
            </p:commandButton> 
        </p:column> 

    </p:dataTable>   
 
</h:form>  	


</ui:define>
</ui:composition>
